<style>
#shuaijin_banner{
  position:relative;
  overflow:hidden;
}
</style>
<div id="banner" style="width:100%;margin-top: 2px;overflow:hidden;position:relative;">


   
    <div id="shuaijin_banner">
    
       
    
        
      {foreach name="banners" as $key  item="banner"}
           {php} $x='2'; $y=$key+$x;$z=100/$y;{/php}
          
         <li style="float:left;" class="imgwidth">
          <a href="{$banner.url}?id={$banner.conid}" target="_blank">
          <img src="{:formatUrl($banner.img)}"  style="width:100%" /></a>
        </li>
      {/foreach}

      
      {foreach name="banners" as $key  item="banner"}
        {if $key==0}
          
          
         <li style="float:left;" class="imgwidth">
          <a href="{$banner.url}?id={$banner.conid}" target="_blank">
          <img src="{:formatUrl($banner.img)}" style="width:100%" /></a>
        </li>
        {/if}
      {/foreach}


      <script>


        $("#shuaijin_banner").css({'width':'{$y}00%'});
        $(".imgwidth").css({'width':'{$z}%'})
        
         function  imgreturn(){




    $("#shuaijin_banner").animate({'left':'0px'},0)
        {foreach name="banners" as $key  item="banner"}
          {php}$num_shuaijin=$key+1;{/php}
          .delay(3000).animate({'left':'-{$num_shuaijin}00%'},600)     
        {/foreach}
    .css({'left':'0%'},0);



     imgreturn();
}





       setTimeout("imgreturn()",3000);


      </script>






        
            
    </div>
  
      <div class="sj_banner_x">
           <a href="/" target="_blank"><img src="/images/sj_banner_x.png" ></a>
      </div>




</div>
